home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
mactosh
/
utilfil
/
picttoxb.sit
/
Picttoxbin ƒ
/
Picttoxbit doc
next >
Wrap
Text File
|
1989-04-08
|
3KB
|
59 lines
This is XBitmap, a utility program I wrote to convert
Macintosh 'PICT' files, such as those created by MacDraw, into
bitmap files suitable for use with X Window System programs. It
can also be used to view X Bitmap files, view 'PICT' files, and
to save an image as a 'PICT' file. As a 'PICT' viewer, the
program is moderately useful even to those who have no dealings
with the X Window system (lucky dogs!)
This program exists to fill a gap in Jef Poskanzer's
"Portable Bitmap Toolkit" (pbm), which can convert a number of
formats to and from MacPaint files, but which has no way of
accessing 'PICT' files. Unfortunately for portability, I am
neither smart enough nor patient enough to write a portable C
program which can parse 'PICT' files on a non-Macintosh
computer. Therefore, I decided to let the Mac ToolBox call
DrawPicture() do all the dirty work, and wrote the program as a
Macintosh application. [HW]ell, chances are that if you have
'PICT' files, then you have a Macintosh to view them on.
This program is a first effort in writing a graphics
converter-filter program, and has a lot of shortcomings:
Saved 'PICT' files really contain a BitMap wrapped up in a
Picture. If you load an Object-Oriented 'PICT' file into
XBitmap, and then print out a 'PICT' file, all of the objects
are lost. You get the same image, but it can no longer be
scaled attractively, nor can separate objects be manipulated by
a drawing program.
Editing functions are non-existent. I just wanted a
converter. Although the program does allow you to view an
image, I included this mainly for debugging.
X format Bitmap files are huge. They should be compressed
before uploading them to your X client machine. Note: "Bitmap"
is correct for X, "BitMap" is correct for Macintosh, "bitmap" is
correct in the general case. X Bitmap is probably the worst
non-Mac bitmap format I could have chosen, but since I currently
do a lot of work on a machine running X Windows, and I just HAD
to have a certain MacDraw document as my backdrop on this
machine, I wrote the program this way.
The only bitmap format supported is "X Bitmap." Those
desiring to create other formats, e.g. Sun raster, could convert
first to X Bitmap, upload the file, then run pbm to get whatever
other format you desire. This is, admittedly, inconvenient.
The program is free. In lieu of releasing "versions" of it
with increasing version number, I plan to upload the source code
next, and wash my hands of it. I am sending the compiled
version now for the benefit of those with neither the
inclination nor the ability to compile C programs on the
Macintosh (more lucky dogs!)
Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755--
Graduate student, scientific programmer.
He who puts his hand to the plow and looks back is not fit for
the kingdom of winners. In any case, 'BACK' doesn't work.